package com.hanlink.dsp.ca.model.settings;

import androidx.annotation.NonNull;

import com.hanlink.dsp.model.BaseSettings;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;


@Table(name = "_home_settings")
public class HomeSettings extends BaseSettings {

    @Column(name = "aux_bt")
    private int auxSwitch = 1; //默认aux关闭 BT开启

    @Column(name = "channel")
    private int channel = 0; //默认2channel

    @Column(name = "model")
    private int model = 4;//默认耳机模式

    @Column(name = "state")
    private int state; //0 未保存 1 已保存

    public int getAuxSwitch() {
        return auxSwitch;
    }

    public void setAuxSwitch(int auxSwitch) {
        this.auxSwitch = auxSwitch;
    }

    public int getChannel() {
        return channel;
    }

    public void setChannel(int channel) {
        this.channel = channel;
    }

    public int getModel() {
        return model;
    }

    public void setModel(int model) {
        this.model = model;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "HomeSettings{" +
                ", auxSwitch=" + auxSwitch +
                ", channel=" + channel +
                ", model=" + model +
                ", state=" + state +
                '}' + super.toString();
    }

    @Override
    public void resetData() {
        auxSwitch = 1;
        model = 4;
        state = 0;
    }


    public HomeSettings copy(){
        final HomeSettings hs = new HomeSettings();
        hs.auxSwitch = auxSwitch;
        hs.channel = channel;
        hs.model = model;
        hs.state = state;
        hs.id = id;
        hs.refId = refId;
        return hs;
    }
}